<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Info extends AdminController
{
    public $_validation = null;

    function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $this->load->model('MShop');
        $this->load->model('MAdminGroup');
        $allGroups = $this->MAdminGroup->getAllGroupsByType(1);
        $allShop = $this->MShop->getAllShopsTrue();
        $this->assign('allShop',$allShop);
        $this->assign('allGroups',$allGroups);
        $this->layout();
    }

    public function ajaxStockLine()
    {
        $this->load->library('FormFilter');
        $this->load->helper('formfilter');
        $this->load->model('MShippingIn');
        $this->load->model("MShippingOut");
        $data = $this->input->post();
        $list = $this->MShippingIn->getInfoIn($data['time_begin'], $data['time_end'], $data['type'],$data['shop_id'],$data['stock'],$data['group_id']);
        exit(json_encode([
            'success' => 1,
            'msg' => '成功',
            'data' => $list
        ]));
    }
}
